// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(72,3) == 0 && gf(64,1) == 0;
	question = "special";
	text1 = "You enter Camp East Alpha, the creation camp at the east gate of the Zephyr Oasis. It houses the serviles that work the crops and do the menial labor, and a host of war creations to help defend against attackers.";
	text2 = "It is a depressing place. The paths are overgrown with weeds, and the reek of rot and garbage is heavy in the air. The walls were recently and hurriedly built, and they are already starting to crumble.";
	text3 = "All of the serviles are currently hiding in the camp. They walk around with heads down, looking completely miserable and demoralized.";
	action = SET_SDF 72 3 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(72,4) == 0;
	question = "special";
	text1 = "You walk down a narrow path. It has recently been hacked out of the strange, fungal desert trees. Clawed tracks run up and down the pathway. It appears that a rogue infestation has established itself surprisingly close to the city.";
	text2 = "You stop and concentrate. You can sense something ... Something powerful. It's somewhere in the woods ahead, hiding.";
	action = SET_SDF 72 4 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(72,5) == 0;
	question = "special";
	text1 = "You round the corner and stumble upon the powerful creature you sensed earlier. It is an Unbound. It somehow slipped into these woods and is preparing itself for an assault.";
	text2 = "When you enter the grove, it is standing there motionless, eyes closed. When it smells you, its eyes fly open. Slowly, it wakes up. It begins to recall its instructions.";
	text3 = "It starts to walk forward, slowly aiming for its target. It doesn't seem to notice you. Yet.";
	action = SET_SDF 72 5 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Zephyr Oasis - West";
	text3 = "  Dera Purity Workshop - East";
	text4 = "  Kayar's Spire - South";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  CAMP EAST ALPHA";
	text3 = "  Check in all unregistered creations with camp master.";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This box is somewhat peculiar. It is locked, but there is no keyhole. Instead, three polished stones have been set into the lid: one red, one yellow, and one green.";
	text2 = "You jab at the stones a few times, but nothing happens. Anything you did to smash this sturdy box open would probably destroy the contents. You leave it alone.";
	text3 = "Remembering what Federa told you, you press the red stone, then the yellow stone three times, then the green stone. The box opens.";
	text4 = "It contains records of the creations kept in this camp. Not useful. There is also a pair of soft, ornkskin gloves. You take them.";
	text5 = "It still contains records of the creations kept in this camp. Nothing else.";
	code =
		clear_strings();
		as(1);
		if (gf(72,2) == 0)
			as(2);
			else {
				as(3);
				if (gf(72,8) == 0) {
					sf(72,8,1);
					as(4);
					reward_give(477);
					}
					else as(5);
				}
	break;
	
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Dera Purity Workshop";
	text3 = "  Shapers and Messengers Only";

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Genta";
	text1 = "There is a servile walking up and down the river shore. She stares at the ground as she moves.";
	text2 = "Normally, you wouldn't think she was unusual, except for one thing. The other serviles seem to walk in circles. She is the only one who is traveling around the camp.";
	text3 = "You stop her. She looks at you. She seems very nervous. _Sorry ... Sorry, visitor. Me Genta._";
	text5 = "Genta is still pacing around nervously. She does seem to still have a little more energy than the other serviles in the camp.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Tell me about this camp.";
	text1 = "_Is where serviles stay. Sleep in tents. Fed. Sometimes. Let out to work. That not so much now._";

begintalknode 12;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Fed sometimes?";
	text1 = "_Not ..._ She starts to speak, and then thinks better of it. _Fed well. Very well. All we could want. Keepers really care about us._ You doubt her sincerity.";

begintalknode 13;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "Have you been let out recently?";
	text1 = "_Not so. Too many rogues. Our Keeper, Federa, nervous. Makes us stay in. Weeks now. Some get nervous._";

begintalknode 14;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Why nervous?";
	text1 = "_Can be hard. In here. Little camp. Weeks at a time. But I ... I don't mind. I not complain._";

begintalknode 15;
	state = 10;
	nextstate = 13;
	condition = 1;
	question = "Where are you from?";
	text1 = "_Born here. In Oasis. Born to work. Proud to work, when I can work._";

begintalknode 16;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "What sort of work do you do?";
	text1 = "_I born to cook. Mother cooked. Father ground meal. Not cook now. Not let near food. Sent out to work in fields._";
	text2 = "She quickly adds, _Happy though! Happy to work in fields! Do duty!_";
	
begintalknode 17;
	state = 10;
	nextstate = 14;
	condition = gf(64,21) == 1;
	question = "I'm looking for a rebel in the camp. Hear anything?";
	text1 = "_No. No! Hear nothing. Not rebel. Good, loyal servile. Work. Follow orders._";

begintalknode 18;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "And you haven't heard anyone say anything suspicious.";
	text1 = "_I not talk to others much. Not much for me to hear._";

begintalknode 19;
	state = 14;
	nextstate = -1;
	condition = get_stat(20) > 3 && get_stat(20) < 7;
	question = "I know you are a rebel! Confess, and it will be easier for you. (Lie.)";
	text1 = "You say the words, but you don't feel like you made them convincing. Genta looks alarmed. _No! No! Me good! Me loyal! I ... I ..._ She breaks into tears and runs away.";
	action = END_TALK;
	
begintalknode 20;
	state = 14;
	nextstate = 15;
	condition = get_stat(20) >= 7;
	question = "If the rebel is not found, this whole camp will be destroyed soon. (Lie.)";
	text1 = "You say the words very convincingly. She believes you. She walks over to the river and stares out over the water. She shakes her head and turns back to you.";
	text2 = "_I am not rebel. But I wish I was one. We should not be here. Prison. No food. I say this to others. I will not hide it. I know I am not wrong._";
	text3 = "_So now what? I speak against Shaper. What you do?_ She defiantly stares you in the eye.";
	code =
		sf(72,1,1);
		award_party_xp(100,30);
	break;
	
begintalknode 21;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "I will spare you, but you have to leave this place.";
	text1 = "You reassure her that the camp is safe and tell her what she must do. She shakes her head. _Though I die, I stay. I talk to others. I calm them. I help them. Is my job._";
	text2 = "_You do what you must. Tell Shaper. Or not. I return to work. My work. My real work._ She turns and walks away.";
	action = END_TALK;

begintalknode 22;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "I will spare you. Do what you want.";
	text1 = "You reassure her that the camp is safe and tell her that she can stay. She nods. _Though I die, I stay. I talk to others. I calm them. I help them. Is my job._";
	text2 = "_You do what you must. Tell Shaper. Or not. I return to work. My work. My real work._ She turns and walks away.";
	action = END_TALK;

begintalknode 23;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "You are a rogue. You must die.";
	text1 = "_Better I die than others._ She points at her head. _I free in here. Do what you must._ She produces a crude dagger from a fold in her cloak ...";
	action = END_TALK;
	code =
		set_attitude(19,10);
		sf(72,1,2);
	break;
	
begintalknode 24;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'll let you go then.";
	text1 = "_Thank you. I go to ... do nothing. More nothing._ She walks off.";
	action = END_TALK;


begintalknode 27;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You try to speak with Genta again. She should show you gratitude for sparing her, but she just brushes past you. Being near someone who knows her secret makes her more nervous than usual.";

begintalknode 28;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several serviles in this camp. They are tired and hungry, and it doesn't look they have been outside the gate in weeks. They are of the simple variety, and nobody has been looking after them. They are very dirty.";
	text2 = "The servile doesn't recognize you and walks away quickly and nervously.";
	text3 = "The servile stares at you when you get close. You try to say something, but the creation turns and shuffles away.";
	text4 = "The servile is staring at the ground. When you say something, you don't get a response.";
	text5 = "You manage to get the servile to speak with you briefly, but the creation is only interested in asking how the crops outside the camp gate are doing.";
	text6 = "You manage to get the servile to speak with you briefly, but the creation is only interested in learning how soon they will be able to leave the camp and get back to work. You, of course, have no idea.";
	text7 = "You try to speak with this servile, but the creation is struck with a painful coughing fit. You back away and give the unfortunate creature time to recover.";
	code =
		clear_strings();
		as(1);
		as(2 + get_ran(1,0,5));
	break;

begintalknode 29;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several war creations in this camp. They are strong and still under control. This isn't surprising. It looks like they have all been created very recently.";
	text2 = "Give it a few more months in this camp, and their control will doubtless weaken. But then, the way things work in the Dera Reaches, some Shaper will probably absorb and recreate them.";
	text3 = "The creation is currently asleep. You don't disturb it.";
	text4 = "This creation is currently gnawing on a bone. Probably keeping its teeth nice and sharp.";
	text5 = "The creation lets out a long snarl when you get close. You keep a safe distance. They can get irritable sometimes.";
	text6 = "The creation is currently squatting in the corner of the pen. You give it its privacy.";
	code =
		clear_strings();
		as(1); as(2);
		as(3 + get_ran(1,0,3));
	break;

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Rasine";
	text1 = "A lone, young outsider woman has been placed in charge of Camp East Alpha. She doesn't seem up to the task. She rushes around, delivering inadequate rations to the war creations, reassuring the serviles, and trying to keep things clean.";
	text2 = "Of course, an armed visitor is an occasion for her to drop everything and see what you want. _Greetings, traveler,_ she says nervously. _I am Rasine. I look after the camp while the master is away._";
	text3 = "_Please let me know if you need any help. Or if you have come to help me._";
	text5 = "You walk with Rasine and speak with her while she carries out her duties. Simple serviles to look after. Powerful and deadly creations to be kept calm. She clearly needs more help.";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "Tell me about this camp.";
	text1 = "_By order of Sage Taygen, when not directly supervised, all creations need to be kept chained or in camps like these. Where they are watched and cared for by Keepers. With what few resources we have._";

begintalknode 32;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "You don't have enough supplies?";
	text1 = "_We ... We get enough to sustain the creations. For survival. Not for comfort._";
	text2 = "_It is unfortunate. Though, if creations had not rebelled in the first place, none of this would be necessary._";

begintalknode 33;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "What sort of creations are here?";
	text1 = "_Serviles to watch the fields. War creations to defend the gate._";
	text2 = "_Though none are let outside now unless absolutely necessary, until there are fewer rogues and Federa returns to give the order._";

begintalknode 34;
	state = 30;
	nextstate = 32;
	condition = 1;
	question = "You have a lot of work to do.";
	text1 = "_I'm afraid that is true. The master, Federa, entered the Oasis and will not leave. And the other assistant is gone._";

begintalknode 35;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "Tell me about Federa.";
	text1 = "_He is officially in charge of this camp. He should be here. But he went into town weeks ago, supposedly to ask Sage Taygen for help, and he has not returned since then._";
	text2 = "_I suspected from the first that he was not suited to this work._";

begintalknode 36;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "What happened to the other assistant?";
	text1 = "_He left. An excess of sentimentality. He had problems with the way the creations were treated, so he dealt with the situation by abandoning them. So I am left alone with the work._";

begintalknode 37;
	state = 30;
	nextstate = 33;
	condition = gf(64,21) == 1 && gf(72,1) == 0;
	question = "I am looking for a rogue or spy in the camp.";
	text1 = "_What? You mean that Federa actually did manage to get some help? Feel free to look around. Talk to whoever or whatever you want._";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = gf(72,1) == 1;
	question = "I need to talk to you about Genta.";
	text1 = "_Genta. A very odd servile. Talk to Federa. He is in the Oasis. It is beyond my authority to deal with her._";

begintalknode 39;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "Any advice on where to start?";
	text1 = "She sighs. _Creations. I feed them. I clean up after them. I don't understand them._";

//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Sergeant Fano";
	text1 = "There is a loyalist soldier patrolling this path. When he sees you, he holds out a hand. _Halt, stranger. I don't recognize you. I am Sergeant Fano, of the Zephyr Oasis guard._";
	text2 = "_Do you have papers? Identification?_";
	text5 = "Sergeant Fano is patrolling the road outside the Zephyr Oasis. He watches you skeptically, waiting for you to show your true colors and attack him at any moment.";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = gf(72,6) == 0 && has_spec_item(4) > 0;
	question = "I have papers from Sage Taygen. (Show them.)";
	text1 = "He looks at them and nods. _All right. You can pass. Nice to meet someone who actually does things the way they're meant to be done._";
	action = SET_SDF 72 6 1;
	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = gf(72,6) == 0;
	question = "I have papers. (Show Rawal's papers.)";
	text1 = "Sergeant Fano inspects them. _More than many have. But not enough. These are from the other end of Terrestia. They don't have much weight here._";
	text2 = "_You'd better get papers in the palace._ He points back toward town. _Or you might find yourself in some trouble._";
	action = END_TALK;
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = gf(72,6) == 0;
	question = "I don't have any papers.";
	text1 = "He sighs. You suspect that he's supposed to do something to you now, but he just doesn't have the energy.";
	text2 = "_Then you'd better get papers in the palace._ He points back toward town. _Or you might find yourself in some trouble._";
	action = END_TALK;
	
begintalknode 54;
	state = 50;
	nextstate = 51;
	condition = gf(72,6) > 0;
	question = "I'd like to know more about this road.";
	text1 = "_Well, let me think. I wouldn't want you to walk the wrong way and get killed._";
	text2 = "_East from here is the Purity Workshop. At least, that's what the sign says it is._";
	text3 = "_And south is Kayar's Spire. I would stay away from there._";
	
begintalknode 55;
	state = 50;
	nextstate = 52;
	condition = gf(72,6) > 0;
	question = "Anything interesting nearby?";
	text1 = "_Around here? Just some crops. And Camp East Alpha. Not much. Just a waste._";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = gf(72,6) > 0 && gf(72,7) > 0;
	question = "I'd like to talk about the Unbound.";
	text1 = "You discuss the Unbound that was hiding in the nearby bush. _Yes. Another close call. One of many. We're getting better at handling the Unbound, but each one still causes losses._";
	
begintalknode 57;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "What is a Purity Workshop?";
	text1 = "_I have no idea. All I know is that when we're near there, our skin itches and our eyes burn. It's Shaper business. Nothing I want to know about._";
	
begintalknode 58;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "What is Kayar's Spire?";
	text1 = "_It's Sage Taygen's huge Shaping fortress. Or something. We stay far away from there._";
	text2 = "_It's guarded with lots of guards and creations, and they kill strangers. If you don't have permission to go there, stay well away._";

begintalknode 59;
	state = 52;
	nextstate = -1;
	condition = 1;
	question = "Any rogue activity?";
	text1 = "_Rogues are always attacking. I think the road is clear right now, though._";

begintalknode 60;
	state = 52;
	nextstate = -1;
	condition = 1;
	question = "How are the crops?";
	text1 = "_Bad. Hardly anything grows around here. But that doesn't stop the Shapers from trying to make new plants._";

begintalknode 61;
	state = 52;
	nextstate = -1;
	condition = 1;
	question = "What is Camp East Alpha?";
	text1 = "_It's the camp by the river shore. It's where all creations around here have to be kept when they aren't working and being supervised. Unless someone has a pass like the one Taygen gave you._";

begintalknode 64;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "This soldier is patrolling the road outside the Zephyr Oasis. He is short and solidly built, with a round face. Probably a descendant of the nomads that once ruled these wastes.";
	text2 = "Like many of the desert dwellers, he is suspicious of outsiders and strangers. You speak with him, but the answers to your questions are monosyllabic and unhelpful.";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		